home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-27 | 1.2 KB | 57 lines | [TEXT/CWIE] |
- UNIT CodeResource;
-
- INTERFACE
-
- USES
- OSUtils;
-
- TYPE
- plugInParameterNumber=RECORD
- realPart,imPart:Double; { Complex number }
- END;
- plugInParameterArray=ARRAY[0..0] OF plugInParameterNumber;
- plugInParameterPtr=^plugInParameterArray;
- plugInParameterHandle=^plugInParameterPtr;
-
- trigoMode=(deg,rad,grad);
-
- {$MAIN}
- PROCEDURE main(params:plugInParameterHandle;mode:trigoMode);
-
- IMPLEMENTATION
-
- USES
- fp;
-
-
- { ============================================================================
- Main procedure (modify only this procedure !)
-
- params Input parameters (fields 1,2,...)
- Result (field 0)
- ============================================================================ }
-
- PROCEDURE main(params:plugInParameterHandle;mode:trigoMode);
- VAR
- { ====================
- Variables:
- ==================== }
- sum:Double;
-
- BEGIN
- { ====================
- Calculating:
- ==================== }
-
- {...}
- sum:=params^^[1].realPart { real part of the first parameter }
- +params^^[2].imPart; { imaginary part of the second parameter }
-
- { ====================
- Result:
- ==================== }
- params^^[0].realPart:=sum;
- params^^[0].imPart:=0; { always fill the two field of params^^[0] }
- END;
-
- END.